package cn.com.huzo.repository.trade.impl;

import cn.com.huzo.model.entities.trade.CommercialInvoiceLinesEntity;
import cn.com.huzo.model.entities.trade.SalesContractLinesEntity;
import cn.com.huzo.model.entities.trade.ShippingOrderHeaderEntity;
import huzofw.repository.impl.GenericRepositoryImpl;
import huzofw.repository.impl.MyBatisDaoUtils;
import cn.com.huzo.repository.trade.CommercialInvoiceLinesWizardRepository;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;

/**
 * 销售发票明细增加向导数据访问对象。
 *
 * @author 范学春
 */
@Repository("CommercialInvoiceLinesWizardRepository")
public class CommercialInvoiceLinesWizardRepositoryImpl extends GenericRepositoryImpl<CommercialInvoiceLinesEntity, String>
        implements CommercialInvoiceLinesWizardRepository {

    private final String namespace = "cn.com.huzo.repository.trade.CommercialInvoiceLinesWizardRepository";

    /**
     * 构造函数,设置the instance to ProductRepositoryImpl.class.
     */
    public CommercialInvoiceLinesWizardRepositoryImpl() {
        super(CommercialInvoiceLinesEntity.class);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<SalesContractLinesEntity> fetchSalesContractForPage(Map<String, Object> condition) {
        return getSqlSession().selectList(MyBatisDaoUtils.getMapperQueryId(
                namespace, "fetchSalesContractForPage"), condition);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<ShippingOrderHeaderEntity> fetchShipOrderHeaderForPage(Map<String, Object> condition) {
        return getSqlSession().selectList(MyBatisDaoUtils.getMapperQueryId(
                namespace, "fetchShipOrderHeaderForPage"), condition);
    }
}
